import 'package:flutter/material.dart';
import 'package:github_client_app/models/task.dart';
import 'package:github_client_app/widget/task_list_title.dart';

class TasksList extends StatelessWidget {
  const TasksList({
    super.key,
    required this.tasks,
  });

  final List<Task> tasks;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: ListView.builder(
        itemCount: tasks.length,
        itemBuilder: (context, index) {
          var task = tasks[index];
          return TaskListTile(task: task);
        },
      ),
    );
  }
}
